import { BrowserRouter, Routes, Route } from "react-router-dom";
import route  from "./route";

function App() {
  return (
    <BrowserRouter>
      <Routes>
        {route.map((item: {
          path: string,
          element: () => JSX.Element
        }) => {
          return <Route key={item.path} path={item.path} element={item.element()} />
        })}

      </Routes>
    </BrowserRouter>
  );
}

export default App
